﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class GetPwd : System.Web.UI.Page
{
    MyDataDataContext db = new MyDataDataContext();
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void BtnResetPwd_Click(object sender, EventArgs e)
    {
        User user= (from c in db.User
                    where c.UserNickname == txtName.Text && c.UserPhone==txtNum.Text
                    select c).First();
        user.UserPwd =txtName.Text;
        db.SubmitChanges();
        lblMsg.Text = "密码已发送！";
    }
}